package com.woniu.mapper;

import com.woniu.entity.Address;
import com.woniu.entity.Order;
import com.woniu.entity.OrderItem;
import com.woniu.entity.UserCart;
import com.woniu.entity.vo.OrderVo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderMapper {

    List<UserCart> checkBuyBookCount(List<Integer> ids,Integer userId);

    Integer addOrder(Order order);
    Integer addOrderItem(List<OrderItem> orderItems);
    Integer updateUserCartState(List<Integer> ids);
    Integer updateBookCount(List<UserCart> userCarts);
    List<Order> queryOrder(Order order);
    List<OrderItem> queryOrderItem(String orderNum);
    Address queryAddressById(Integer addressId);
    Integer cancelOrder(String orderNum);
    Integer payOrder(String orderNum);
    Integer commentOrder(String orderNum,Integer score, String comment);
    Order queryOrderByOrderNum(String orderNum);
    Integer updateOrderStatus(String orderNum);

}
